package com.caration.shell.workspace3D;

import android.graphics.PixelFormat;

import com.caration.shell.ShellWallpaperManager;
import com.caration.shell.config.CommonConfig;
import com.caration.shell.cr3d.GLHandler;
import com.caration.shell.cr3d.a.ReflectHelper;
import com.caration.shell.workspace2D.ShellGLSurfaceView;

public final class ShellRenderHost extends ReflectHelper {
	public static String EVENT_READY = "EVENT_READY";
	public static String EVENT_INIT_COMPLETE = "EVENT_INIT_COMPLETE";
	private static ShellRenderHost sInstance;
	// private static u e;
	private ShellGLSurfaceView mGLView;

	public ShellRenderHost(ShellGLSurfaceView glSurfaceView) {
		sInstance = this;
		mGLView = glSurfaceView;
		if (!CommonConfig.isLiveWallpaper()) {
			mGLView.getHolder().setFormat(PixelFormat.RGB_565);
			mGLView.setEGLConfigChooser(true);
		} else {
			mGLView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
			mGLView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
		}
		mGLView.setZOrderOnTop(true);
		// e = new u(mGLView);
	}

	public static ShellRenderHost getInstance() {
		return sInstance;
	}

	public static void d() {
		// e.j().a();
		// e.k();
		ShellWallpaperManager.i();
	}

	public static void e() {
		// e.b();
	}

	public static ak h() {
		// return e.h();
	}

	public static cp i() {
		// return e.g();
	}

	public static c j() {
		// return e.f();
	}

	public static eb k() {
		// return e.e();
	}

	public static df l() {
		// return e.i();
	}

	public static u m() {
		// return e;
	}

	public static t n() {
		// return e.d();
	}

	public static a o() {
		// return e.j();
	}

	//p
	public static ShellWallpaperManager getWallpaperManager() {
		// return e.k();
		return null;
	}

	public static av q() {
		// return e.l();
	}

	//
	public static dh r() {
		// return e.m();
	}

	public final void b() {
		invoke(EVENT_READY);
	}

	public final void c() {
		invoke(EVENT_INIT_COMPLETE);
	}

	public final void onResume() {
		mGLView.onResume();
	}

	public final void onPause() {
		GLHandler.queueEvent(new Runnable() {
			@Override
			public void run() {
				// e.c();
			}
		});
		mGLView.onPause();
	}
}
